<!--#include file="Config.asp"-->
<!--#include file="Check_IsITAdmin.asp"-->
<!--#include file="Header.asp"-->
<%
	rs.open "select max(zy_xh) as max_xh from tb_zy",conn,1,1
	zy_xh=rs("max_xh")+1

%>
<script>
function check()
{
if(document.FormLogin.zy_name.value=="")
 {
  alert("提示：\n请输入中文名！");
  document.FormLogin.zy_name.focus();
  return false;
 }

if(document.FormLogin.zy_account.value=="")
 {
  alert("提示：\n请输入AD帐号！");
  document.FormLogin.zy_account.focus();
  return false;
 }

if(document.FormLogin.zy_order.value=="")
 {
  alert("提示：\n请输入AD显示名！");
  document.FormLogin.zy_order.focus();
  return false;
 }


/*if(!(/^1[3|4|5|8][0-9]\d{8}$/.test(document.FormLogin.zy_mobile.value))){
alert("提示：\n不是完整的11位手机号!\n请输入手机长号！");
document.FormLogin.zy_mobile.focus();
return false;
}
*/

}
</script>
<table class="table table-border table-bordered table-hover">
<form name="FormLogin" method="post" action="Emp_AddSave.asp" id="FormLogin" onSubmit="return check();">
    <tr>
      <td colspan="2" bgcolor="#0099CC" align='center'><FONT COLOR="#FFFFFF"><B>添加新账号</B></FONT></td>
    </tr>
    <!-- <tr>
      <td >SAP_ID：</td>
      <td> <input type="text" name="SAPID" size="20">非8位数编号</td>
    </tr>
    <tr>
      <td >身份证号：</td>
      <td> <input type="text" name="CardID" size="40"></td>
    </tr> -->
    <tr>
      <td   ><font color="#FF0000">中文全名：</font></td>
      <td> <input type="text" name="zy_name" size="40"> </td>
    </tr>
    <tr>
      <td ><font color="#FF0000">AD 帐号：</font></td>
      <td> <input name="zy_account" type="text" id="zy_account" size="15">@vanke.com</td>
    </tr>
	<tr>
      <td ><font color="#FF0000">AD显示名：</font></td>
      <td> <input name="zy_order" type="text" id="zy_order" size="40"> </td>
    </tr>
    <tr>
      <td ><font color="#FF0000">性别：</font></td>
      <td><select name="zy_sex" id="zy_sex">
          <option value="男">男</option>
          <option value="女">女</option>
        </select></td>
    </tr>
    <tr>
      <td ><font color="#FF0000">部门：</font></td>
      <td>
	  <select name="zy_dept">
          <%
		 rs.close
		 'rs.open "select dep_id,bm_mc,bm_order from tb_bm where bm_isshow=1 order by bm_order",conn,1,1
		 rs.open "select dep_id,bm_mc,bm_order from tb_bm order by dep_id desc",conn,1,1
		 while not rs.eof
		 	response.write "<option value=" & int(rs("dep_id")) & ">" & trim(rs("bm_order"))& "."& trim(rs("bm_mc")) & "</option>"
			rs.movenext
		 wend
		%>
        </select> </td>
    </tr>
		<tr>
      <td ><font color="#FF0000">长手机号码：</font></td>
      <td> <input name="zy_mobile" type="text" size="20"><SELECT NAME="MType">
<OPTION VALUE="1">移动手机</option>
<OPTION VALUE="2">联通手机</option>
<OPTION VALUE="3">电信手机</option>
</SELECT>
（用于短信平台，必须填） </td>
    </tr>
    <tr>
      <td >是否考勤：</td>
      <td>
	  <select name="zy_job">
          <option value="Y">是</option>
          <option value="W">否</option>
        </select></td>
    </tr>
    <tr>
      <td ><font color="#FF0000">职务：</font></td>
      <td>
	  <select name="zy_title">
          <%
		 rs.close
		 rs.open "select t_title from xp_basic_title order by t_order DESC",conn,1,1
		 while not rs.eof
		%>
		<option value="<%=Trim(rs("t_title"))%>" ><%=trim(rs("t_title"))%></option>
		<%
		rs.movenext
		 wend
		 rs.close
		%>
        </select> </td>
    </tr>
	  <tr>
      <td ><font color="#FF0000">分类：</font></td>
      <td>
	  <select name="zy_job">
          <%
		 rs.open "select * from xp_basic_job order by j_id",conn,1,1
		 while not rs.eof
		%>
		<option value="<%=Trim(rs("j_id"))%>"<%if int(rs("j_id"))=5 then %>selected<%end if%>><%=trim(rs("j_job"))%></option>
		<%
		rs.movenext
		 wend
		 rs.close
		%>
        </select> </td>
    </tr>
	 <tr>
      <td  >序列/职务：</td>
      <td>
	  <select name="zy_zw">
<option value='Y' >Y系</option>
<option value='M' >M:经理/副经理/经理助理/部门负责人</option>
<option value='M3' >M3:总经理助理</option>
<option value='M5' >M5:总经理</option>
<option value='W' >W系</option>
        </select> </td>
    </tr>
 <tr>
      <td  >公司：</td>
      <td>
<select name="zy_companyID">
          <%
		 rs.open "select * from xp_basic_company order by CompanyID",conn,1,1
		 while not rs.eof
		%>
		<option value="<%=int(rs("CompanyID"))%>"><%=trim(rs("Company"))%></option>
		<%
		rs.movenext
		 wend
		 rs.close
		%>
        </select>  </td>
    </tr>
	 <tr>
      <td  >城市：</td>
      <td>
	  <select name="zy_city">
          <%
		 rs.open "select * from xp_basic_city order by City_ID",conn,1,1
		 while not rs.eof
		%>
		<option value="<%=int(rs("city_ID"))%>"><%=trim(rs("city_name"))%></option>
		<%
		rs.movenext
		 wend
		 rs.close
		%>
        </select> </td>
    </tr>

    <tr>
      <td colspan="2"bgcolor="#0099CC" align="center">
	  <INPUT TYPE="submit" value=" <%=session("User_Name")%>添加 ">
          &nbsp;&nbsp;<INPUT TYPE="reset" value=" 重置 ">
        </td>
    </tr>
</form>
  </table>


<!--#include file="Footer.asp"-->


